package com.lgy.service.impl;

import com.lgy.dao.CarDao;
import com.lgy.pojo.Car;
import com.lgy.service.ICarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarServiceImpl implements ICarService {
    @Autowired
    private CarDao carDao;

    @Override
    public List<Car> findCarAllById(Integer seriesId) {
        return carDao.findCarAllById(seriesId);
    }

    @Override
    public Car findCarPriceById(Integer carId) {
        return carDao.findCarPriceById(carId);
    }

    @Override
    public List<Car> selectCarByBrandOrSeries(Integer brandId, Integer seriesId) {
        List<Car> carList = carDao.selectCarByBrandOrSeries(brandId, seriesId);
        return carList;
    }
}
